//
//  LRLoginVC.m
//  LrjhIOS
//
//  Created by jun on 2020/10/29.
//  Copyright © 2020 AXE. All rights reserved.
//

#import "LRLoginVC.h"
#import "JzzxVC.h"
#import "NaviVC.h"
#import "JzdxVC.h"
#import "DESCrypts.h"
#import "CaptureVC.h"

@interface LRLoginVC ()




@end

@implementation LRLoginVC

- (void)viewDidLoad {
    [super viewDidLoad];   
    NSString *lon = [DESCrypts Decrypt:@"34a693b25f29775d7d382ac91637a10f"];
    NSString *lat = [DESCrypts Decrypt:@"3609e0c50229cec1262cccc120c60596"];
    
    NSLog(@"==lon==%@",lon);
    NSLog(@"==lat==%@",lat);
}



-(IBAction)onLogin:(id)sender{

    NSDictionary *parm = @{
        @"opendid":@"o_Kjh5B2nok4v67DFafH-fagiNpE",
        @"phoneNumber":@"17608090406"
    };
    
    NSString *url = @"https://www.hyjzzx.cn/api/login/app/getPhoneNumber";
    MB_LOADING(@"Logining...");
    [LEHttp httpPost:url token:@"" param:parm response:^(NSInteger code, NSString *message, id data) {
        MB_HIDE();
        if(code==1){
            NSDictionary *dataObj = data[@"data"];
            JzzxVC *vc = [JzzxVC new];
            vc.token = [NSString stringWithFormat:@"%@",dataObj[@"token"]];
            [self go2VC:vc];
        }
    }];
    
//    JzzxVC *vc = [JzzxVC new];
//    vc.token = @"8794cf73626b48f0be0b4d272238599a";
//    [self go2VC:vc];
    
    
}

- (IBAction)onCode:(id)sender {
    
}

- (IBAction)onQqLogin:(id)sender {
    JzdxVC *vc = [JzdxVC new];
    [self go2VC:vc];
}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:YES animated:animated];
}

-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [self.navigationController setNavigationBarHidden:NO animated:animated];
}


- (IBAction)onCamera:(id)sender {
    CaptureVC *vc = [CaptureVC new];
    [self go2VC:vc];
    
}

@end
